-
Notifications
You must be signed in to change notification settings - Fork 13.6k
editorconfig: don't trim trailing whitespace in tests #144642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Some changes occurred in src/tools/cargo cc @ehuss |
This comment has been minimized.
This comment has been minimized.
9f764bd
to
504a2c1
Compare
How about disabling it only for stdout and stderr files in tests? |
@mati865 there's a few run-make tests that use other file extensions, so collecting a comprehensive list might be a bit tricky. i think more reliable maybe would be disabling it for all |
@lolbinarycat that sounds sensible to me but I'd leave the decision to the reviewer. |
r? compiler |
I would personally also prefer to limit this restriction only to affected tests. I think it's fine for this to be an ad-hoc list of tests where it matters. I would personally love there to be a But 🤷 I think only listing the effected test in the editor config would also be fine, don't have any strong opinions here |
There are over 850 affected tests. |
and these tests rely on their trailing whitespace? as in, how many tests actually intend to have trailing whitespace instead of being cases where we maybe should actually change them to not do so. I don't want to block a change which prevents some editors from silently messing up your PR for the sake of a larger change, so I'd be fine with merging this for now and opening an issue that we should reenable this for at least ui tests and maybe even have a tidy check for it |
504a2c1
to
cad16c3
Compare
cad16c3
to
7af87d1
Compare
There's also 4381 tests that end with multiple newlines, something that has an actual affect on UX, and something that is also (at least in emacs) also controlled by the I re-enabled |
sgtm @bors r+ rollup |
…ake, r=lcnr editorconfig: don't trim trailing whitespace in tests some test snapshot files require trailing whitespace, and previously manually editing those snapshot files (as is required for run-make tests and some platform-specific tests) in an editor with editorconfig support would cause that whitespace to be removed, [causing CI failures like this one](rust-lang#144596 (comment))
…ake, r=lcnr editorconfig: don't trim trailing whitespace in tests some test snapshot files require trailing whitespace, and previously manually editing those snapshot files (as is required for run-make tests and some platform-specific tests) in an editor with editorconfig support would cause that whitespace to be removed, [causing CI failures like this one](rust-lang#144596 (comment))
…ake, r=lcnr editorconfig: don't trim trailing whitespace in tests some test snapshot files require trailing whitespace, and previously manually editing those snapshot files (as is required for run-make tests and some platform-specific tests) in an editor with editorconfig support would cause that whitespace to be removed, [causing CI failures like this one](rust-lang#144596 (comment))
…ake, r=lcnr editorconfig: don't trim trailing whitespace in tests some test snapshot files require trailing whitespace, and previously manually editing those snapshot files (as is required for run-make tests and some platform-specific tests) in an editor with editorconfig support would cause that whitespace to be removed, [causing CI failures like this one](rust-lang#144596 (comment))
Rollup of 7 pull requests Successful merges: - #144642 (editorconfig: don't trim trailing whitespace in tests) - #144955 (search graph: lazily update parent goals) - #145153 (Handle macros with multiple kinds, and improve errors) - #145250 (Add regression test for former ICE involving malformed meta items containing interpolated tokens) - #145269 (Deprecate RUST_TEST_* env variables) - #145289 (chore(ci): upgrade checkout to v5) - #145303 (Docs: Link to payload_as_str() from payload().) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 7 pull requests Successful merges: - #144642 (editorconfig: don't trim trailing whitespace in tests) - #144955 (search graph: lazily update parent goals) - #145153 (Handle macros with multiple kinds, and improve errors) - #145250 (Add regression test for former ICE involving malformed meta items containing interpolated tokens) - #145269 (Deprecate RUST_TEST_* env variables) - #145289 (chore(ci): upgrade checkout to v5) - #145303 (Docs: Link to payload_as_str() from payload().) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 11 pull requests Successful merges: - #143467 (Add ASCII-related methods from `u8` and `MIN`/`MAX` to `core::ascii::Char`) - #144519 (Constify `SystemTime` methods) - #144642 (editorconfig: don't trim trailing whitespace in tests) - #144870 (Stabilize `path_file_prefix` feature) - #145269 (Deprecate RUST_TEST_* env variables) - #145274 (Remove unused `#[must_use]`) - #145289 (chore(ci): upgrade checkout to v5) - #145303 (Docs: Link to payload_as_str() from payload().) - #145308 (Adjust documentation of `dangling`) - #145320 (Allow cross-compiling the Cranelift dist component) - #145325 (Add `cast_init` and `cast_uninit` methods for pointers) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #144642 - lolbinarycat:editorconfig-no-run-make, r=lcnr editorconfig: don't trim trailing whitespace in tests some test snapshot files require trailing whitespace, and previously manually editing those snapshot files (as is required for run-make tests and some platform-specific tests) in an editor with editorconfig support would cause that whitespace to be removed, [causing CI failures like this one](#144596 (comment))
some test snapshot files require trailing whitespace, and previously manually editing those snapshot files (as is required for run-make tests and some platform-specific tests) in an editor with editorconfig support would cause that whitespace to be removed, causing CI failures like this one